<%@ Page Language="vb" AutoEventWireup="false" Codebehind="CaseReports.aspx.vb" Inherits="ccapps.CaseReports" %>
<%@ Register TagPrefix="cc1" Namespace="Library.WebControls" Assembly="lib" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>CaseReport</title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
	</HEAD>
	<body>
		<form id="Form1" method="post" runat="server">
			<TABLE id="Table2" style="BORDER-COLLAPSE: collapse" cellPadding="3" width="100%" border="0">
				<TR>
					<TD class="prompt" vAlign="middle" colSpan="2" height="35" rowSpan="1"><asp:label id="lblContextHeader" runat="server">Search.</asp:label></TD>
				</TR>
				<TR>
					<TD class="solbaslik" width="120">Case Type</TD>
					<TD class="input"><asp:dropdownlist id="ddlType" runat="server" onchange="setHeader(this.item(this.selectedIndex).text)"
							Width="300px"></asp:dropdownlist></TD>
				</TR>
				<TR>
					<TD class="solbaslik" width="120">Date</TD>
					<TD class="input" vAlign="middle"><cc1:datepicker id="DatePicker1" runat="server" Width="140px"></cc1:datepicker>&nbsp; 
						- &nbsp;<cc1:datepicker id="DatePicker2" runat="server" Width="140px"></cc1:datepicker></TD>
				</TR>
				<TR>
					<TD class="solbaslik" noWrap width="120"><asp:label id="lblCaseItemID" runat="server">Item ID</asp:label></TD>
					<TD class="input"><asp:textbox id="txtItemID" runat="server" Width="300px"></asp:textbox></TD>
				</TR>
				<TR>
					<TD class="solbaslik" noWrap width="120">Area</TD>
					<TD class="input"><asp:textbox id="txtArea" runat="server" Width="300px"></asp:textbox></TD>
				</TR>
				<TR>
					<TD class="solbaslik" noWrap width="120">Status</TD>
					<TD class="input"><asp:dropdownlist id="ddlStatus" runat="server" Width="300px">
							<asp:ListItem Selected="True" Value="">All</asp:ListItem>
						</asp:dropdownlist></TD>
				</TR>
				<TR>
					<TD class="solbaslik" noWrap width="120">Reason</TD>
					<TD class="input"><asp:textbox id="txtReason" runat="server" Width="300px"></asp:textbox></TD>
				</TR>
				<TR>
					<TD class="solbaslik" noWrap width="120"></TD>
					<TD class="input"></TD>
				</TR>
				<TR>
					<TD class="solbaslik" noWrap width="120"></TD>
					<TD class="input"><asp:button id="btnSearch" runat="server" Text="Search" CssClass="button01"></asp:button></TD>
				</TR>
			</TABLE>
			<P><asp:datagrid id="DataGrid1" runat="server" Width="100%" AutoGenerateColumns="False" AllowPaging="True">
					<FooterStyle ForeColor="White" BackColor="#A2547F"></FooterStyle>
					<HeaderStyle Wrap="False" Height="30px" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
					<Columns>
						<asp:BoundColumn DataField="CaseType" HeaderText="Case Type">
							<HeaderStyle Font-Size="11px" Font-Names="Arial" Font-Bold="True" Wrap="False" ForeColor="White"></HeaderStyle>
							<ItemStyle Font-Size="11px" Font-Names="Arial" Wrap="False" BackColor="Lavender"></ItemStyle>
						</asp:BoundColumn>
						<asp:BoundColumn DataField="CaseItemID" HeaderText="ID">
							<HeaderStyle Font-Size="11px" Font-Names="Arial" Font-Bold="True" Wrap="False" ForeColor="White"
								Width="120px"></HeaderStyle>
							<ItemStyle Font-Size="11px" Font-Names="Arial" Wrap="False" BackColor="Lavender"></ItemStyle>
						</asp:BoundColumn>
						<asp:BoundColumn DataField="Area" HeaderText="Area">
							<HeaderStyle Font-Size="11px" Font-Names="Arial" Font-Bold="True" Wrap="False" ForeColor="White"></HeaderStyle>
							<ItemStyle Font-Size="11px" Font-Names="Arial" Wrap="False" BackColor="Lavender"></ItemStyle>
						</asp:BoundColumn>
						<asp:BoundColumn DataField="CaseStatus" HeaderText="Status">
							<HeaderStyle Font-Size="11px" Font-Names="Arial" Font-Bold="True" Wrap="False" ForeColor="White"></HeaderStyle>
							<ItemStyle Font-Size="11px" Font-Names="Arial" Wrap="False" BackColor="Lavender"></ItemStyle>
						</asp:BoundColumn>
						<asp:BoundColumn DataField="CreateDate" HeaderText="Submit Date" DataFormatString="{0:dd.MM.yyyy HH:mm}">
							<HeaderStyle Font-Size="11px" Font-Names="Arial" Font-Bold="True" Wrap="False" ForeColor="White"></HeaderStyle>
							<ItemStyle Font-Size="11px" Font-Names="Arial" Wrap="False" BackColor="Lavender"></ItemStyle>
						</asp:BoundColumn>
						<asp:TemplateColumn>
							<HeaderStyle Font-Size="11px" Font-Names="Arial" Font-Bold="True" Wrap="False" ForeColor="White"></HeaderStyle>
							<ItemStyle Font-Size="11px" Font-Names="Arial" Wrap="False" HorizontalAlign="Right" BackColor="Lavender"></ItemStyle>
							<ItemTemplate>
								<asp:HyperLink id=HyperLink2 runat="server" NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "CaseID", "CaseDetail.Aspx?CaseID={0}") %>'>Details</asp:HyperLink>
							</ItemTemplate>
						</asp:TemplateColumn>
					</Columns>
					<PagerStyle Font-Size="11px" Font-Names="Arial" HorizontalAlign="Right" ForeColor="White" BackColor="#A2547F"
						Mode="NumericPages"></PagerStyle>
				</asp:datagrid></P>
		</form>
		<script language="javascript">
		
		setHeader(document.all['ddlType'].item(document.all['ddlType'].selectedIndex).text);
		
		function setHeader(caseTypeName)
		{
			document.all['lblCaseItemID'].innerText = (caseTypeName == 'All' ? 'Item' : caseTypeName) + ' ID';
		}
		
		</script>
	</body>
</HTML>
